﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace Zj.HttpCodeDemo.Domain.Events
{
    public interface IEventPulisher
        :IDisposable
    {
        void Pulish<TEvent>(TEvent @event)
            where TEvent:IEvent;

        Task PublishAsync<TEvent>(TEvent @event, CancellationToken cancellationToken = default(CancellationToken))
            where TEvent : IEvent;
    }
}
